﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace CodeSaude.Domain.Interfaces.Repository {
    public interface IBaseRepository<TEntity> : IDisposable where TEntity : class {
        void Add(TEntity obj);
        TEntity GetById(int id);
        IEnumerable<TEntity> GetAll();
        void Update(TEntity obj);
        void Remove(TEntity obj);
        IEnumerable<TEntity> FindReadOnly(Expression<Func<TEntity, bool>> predicate);
        IEnumerable<TEntity> GetAllReadOnly();
        void SaveChanges();
    }
}
